import React, {PureComponent} from 'react';
import { BraftPreviewComp, BraftEditorComp, ButtonComp } from 'jh-lib';
import { Form } from "antd";
import bb from "../../../assets/f.png";


export default class base extends PureComponent {
    state = {
        comment : `13<img src="${bb}" data-src="${bb}"/><p><img src="${bb}" data-src="${bb}"/></p>`
    }
    render(){
        let { comment } = this.state;
        return (
            <>
                <BraftEditorComp defaultValue={comment} isDrag={true} onChange={(val)=>{
                    this.setState({comment: val})
                }}/>
                <div>
                    <ButtonComp style={{marginBottom: 12}}>预览</ButtonComp>
                    <BraftPreviewComp
                        comment={comment}
                    />
                </div>
            </>
        )
    }
};